const mongoose = require("mongoose")

// 酒店数据模型
const TourismSchema = mongoose.Schema({
    // 酒店的id
    goodsId: {
        type: String,
        require: true
    },
    // 发布者的id
    owenerId: {
        type: mongoose.Schema.Types.ObjectId,
        require: true,
        ref: "user"
    },
    //去玩的地址 
    city: {
        type: String,
        require: true
    },
    // 去玩的地点名字
    title: {
        type: String,
        require: true,
        default: "广东省广州市天河区迎龙海悦城"
    },
    // 访客
    visitor: {
        type: Number,
        default: 2
    },
    // 图片
    picUrl: {
        type: String,
        require: true
    },
    // 标签
    tite: Array,
    // 文案
    offical: {
        type: String,
        require: true
    },
    // 评分
    score: {
        type: Number,
        require: true
    },
    // 点赞数
    likeygoodNum: {
        type: Number,
        require: true
    }

})

const Tourism = mongoose.model("tourism", TourismSchema);

module.exports = Tourism